package com.light.gulimall.product.vo;

import com.light.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Objects;

public class AttrVO extends AttrEntity {

    /**
     * 所属分类名字
     */
    private String catelogName;

    /**
     * 所属分组名字
     */
    private String groupName;

    /**
     * 分组id  pms_attr_group 主键ID
     */
    private Long attrGroupId;

    /**
     * 分类id pms_category 主键ID
     */
    private Long catelogId;

    /**
     * 分类完整路径
     */
    private List<Long> catelogPath;


    public AttrVO() {
    }

    public AttrVO(String catelogName, String groupName, Long attrGroupId, Long catelogId, List<Long> catelogPath) {
        this.catelogName = catelogName;
        this.groupName = groupName;
        this.attrGroupId = attrGroupId;
        this.catelogId = catelogId;
        this.catelogPath = catelogPath;
    }

    /**
     * 获取
     * @return catelogName
     */
    public String getCatelogName() {
        return catelogName;
    }

    /**
     * 设置
     * @param catelogName
     */
    public void setCatelogName(String catelogName) {
        this.catelogName = catelogName;
    }

    /**
     * 获取
     * @return groupName
     */
    public String getGroupName() {
        return groupName;
    }

    /**
     * 设置
     * @param groupName
     */
    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    /**
     * 获取
     * @return attrGroupId
     */
    public Long getAttrGroupId() {
        return attrGroupId;
    }

    /**
     * 设置
     * @param attrGroupId
     */
    public void setAttrGroupId(Long attrGroupId) {
        this.attrGroupId = attrGroupId;
    }

    /**
     * 获取
     * @return catelogId
     */
    public Long getCatelogId() {
        return catelogId;
    }

    /**
     * 设置
     * @param catelogId
     */
    public void setCatelogId(Long catelogId) {
        this.catelogId = catelogId;
    }

    /**
     * 获取
     * @return catelogPath
     */
    public List<Long> getCatelogPath() {
        return catelogPath;
    }

    /**
     * 设置
     * @param catelogPath
     */
    public void setCatelogPath(List<Long> catelogPath) {
        this.catelogPath = catelogPath;
    }

    public String toString() {
        return "AttrVO{catelogName = " + catelogName + ", groupName = " + groupName + ", attrGroupId = " + attrGroupId + ", catelogId = " + catelogId + ", catelogPath = " + catelogPath + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AttrVO attrVO = (AttrVO) o;
        return Objects.equals(catelogName, attrVO.catelogName) && Objects.equals(groupName, attrVO.groupName) && Objects.equals(attrGroupId, attrVO.attrGroupId) && Objects.equals(catelogId, attrVO.catelogId) && Objects.equals(catelogPath, attrVO.catelogPath);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), catelogName, groupName, attrGroupId, catelogId, catelogPath);
    }
}
